A Stirling engine operates by cyclically compressing and expanding a working gas within a closed system. For example, the system could be made up of a cold cylinder, a hot cylinder, a cooling tube, a heating tube, and a regenerator (which captures thermal energy stored in the working gas). In a conventional Stirling engine, the working gas (e.g., air) travels from the cold cylinder to hot cylinder as the cold cylinder compresses the working gas. The working gas passes through the cooling tube, the regenerator, and the heating tube before reaching the hot cylinder. Working gas then travels from the hot to cold cylinder as the hot cylinder expands, and traverses the reverse path. In this way, the working gas leaving the cold cylinder is cooled by the cooling tube before being heated by the regenerator and heating tube. Similarly, gas leaving the hot cylinder is heated by the heating tube before being cooled by the regenerator and cooling tube.